package metalink.admin;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import java.sql.*;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import vo.*;
import vo.mixed.*;
import model.admin.*;
import myutil.*;
public class CreateEvent extends ActionSupport {
String event_name;
public String getEvent_name() {
	return event_name;
}
public void setEvent_name(String event_name) {
	this.event_name = event_name;
}
public String getEvent_description() {
	return event_description;
}
public void setEvent_description(String event_description) {
	this.event_description = event_description;
}
public String getEvent_date() {
	return event_date;
}
public void setEvent_date(String event_date) {
	this.event_date = event_date;
}
public String getEvent_time() {
	return event_time;
}
public void setEvent_time(String event_time) {
	this.event_time = event_time;
}
String event_description;
String event_date;
String event_time;
String creator_username;
String event_location;
public String getEvent_location() {
	return event_location;
}
public void setEvent_location(String event_location) {
	this.event_location = event_location;
}
public String execute(){
	try {
		HttpSession session = ServletActionContext.getRequest().getSession();
		creator_username=session.getAttribute("username").toString();
		new CreateEventMo().createEvent(creator_username,event_name,event_description,event_date,event_time,event_location);
		addActionMessage("Event Created Successfully");
		return SUCCESS;
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
		return ERROR;
	}
	
}
}
